package study.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//定义了配置类
@Configuration
public class MyConfig {
    //把MyService交给配置类MyConfig来管理
    @Bean   //相当于 xml配置文件中写 <bean id=myService class="MyService"  ></bean>
    public MyService myService123(){
        return new MyService();
    }
}
